#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <iostream>
#include <mili/mili.h>
#include "prot-filer/cached_reader.h"
#include "feca/feca.h"

using namespace std;
using namespace prot_filer;
using namespace backbones_utils;
using mili::insert_into;

TEST(BackbonesUtilsTest, read)
{
    vector<AngleIdPair> data;
    insert_into(data, AngleIdPair(0, 0));
    insert_into(data, AngleIdPair(0, 0));
    insert_into(data, AngleIdPair(0, 0));
    insert_into(data, AngleIdPair(0, 0));
    insert_into(data, AngleIdPair(0, 0));

    AnglesMapping mapping(data.size() + 1);
    mapping.set_mapping(-60, -40);
    mapping.set_mapping(-60, 140);
    mapping.set_mapping(-130, 140);
    mapping.set_mapping(60, 30);

    AnglesData angles_data(data.size() + 1, &mapping);
    for (unsigned int c = 0; c < data.size(); ++c)
    {
        angles_data.angles[c] = data[c];
    }

    BasicProtein p(angles_data.nres * 3);
    angles2coord(p, mapping, angles_data);

    for (unsigned int i = 0; i < (angles_data.nres * 3); ++i)
    {
        cout << p[i].x << " " << p[i].y << " " << p[i].z << endl;
    }
}
